package com.framework.loippi.utils.excel;

/***处理excel返回值*/
public class ExcelResultUtil {
    private static final String INCOME = "收入";
    private static final String SPENDING = "支出";
    private static final String ORDER_INCOME = "订单收入";
    private static final String AFTER_A_REFUND = "售后退款";
    private static final String WITHDRAWAL = "提现";
    private static final String WECHAT = "微信";
    private static final String PAY_TREASURE = "支付宝";
    private static final String STORE_BALANCE = "店铺余额";


    /**
     * 商家流水处理类型
     *
     * @param type
     * @return
     */
    public static String s_f_r_type(Integer type) {
        if (null == type) {
            return "";
        }
        if (type == 1) {
            return INCOME;
        }
        return SPENDING;
    }


    /**
     * 事由（1-订单收入  2-售后退款  3-提现）
     *
     * @param type
     * @return
     */
    public static String running_water(Integer type) {
        if (null == type) {
            return "";
        }
        if (type == 1) {
            return ORDER_INCOME;
        }
        if (type == 2) {
            return AFTER_A_REFUND;
        }
        return WITHDRAWAL;
    }

    /**
     * 支付方式
     *
     * @param type (1-微信  2-支付宝)
     * @return
     */
    public static String method_of_payment(Integer type) {
        if (null == type) {
            return "";
        }
        if (type == 1) {
            return WECHAT;
        }
        return PAY_TREASURE;
    }

    /**
     * 到账方式(1-店铺余额)
     *
     * @param type
     * @return
     */
    public static String accounts(Integer type) {
        if (null == type) {
            return "";
        }
        if (type == 1) {
            return STORE_BALANCE;
        }
        return null;
    }

    /**
     * 订单状态
     *
     * @param status(订单状态（1-待支付，2-已支付，3-待发货，4-已发货，5-待收货，6-已收货/待评价，7-已完成，8-已取消，9-售后中，10-售后完成） )
     * @return
     */
    public static String orderStatus(Integer status) {
        if (null == status) {
            return "";
        }
        String str = "";
        switch (status) {
            case 1:
                str = "待支付";
                break;
            case 2:
                str = "已支付";
                break;
            case 3:
                str = "待发货";
                break;
            case 4:
                str = "已发货";
                break;
            case 5:
                str = "待收货";
                break;
            case 6:
                str = "已收货/待评价";
                break;
            case 7:
                str = "已完成";
                break;
            case 8:
                str = "已取消";
                break;
            case 9:
                str = "售后中";
                break;
            case 10:
                str = "售后完成";
                break;

            default:
                str = "";
                break;
        }
        return str;
    }

    /**
     * 订单类型（1-普通，2-秒杀，3拼团）
     *
     * @param type
     * @return
     */
    public static String orderType(Integer type) {
        if (null == type) {
            return "";
        }
        String str = "";
        switch (type) {
            case 1:
                str = "普通";
                break;
            case 2:
                str = "秒杀";
                break;
            case 3:
                str = "拼团";
                break;
            default:
                str = "";
                break;
        }
        return str;
    }

    /**
     * 状态(1-待处理，2-已处理，3-拒绝)
     *
     * @param status
     * @return
     */
    public static String withdrawStatus(Integer status) {
        if (null == status) {
            return "";
        }
        String str = "";
        switch (status) {
            case 1:
                str = "待处理";
                break;
            case 2:
                str = "已处理";
                break;
            case 3:
                str = "已拒绝";
                break;
            default:
                str = "";
                break;
        }
        return str;
    }


}
